package com.sora.sora.security.login.model.param;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 登录参数
 *
 * @author sora
 * @date 2021/07/23
 */
@Data
public class LoginParam {

    /**
     * id，用户名或邮箱
     */
    @NotBlank(message = "用户名不能为空")
    private String name;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Length(min = 8, max = 16, message = "密码长度在8-16之间")
    private String password;
}
